package com.HomeWorkhsp.chapter10.homework.homework04;

/**
 * Enjoy programming!!!
 * Time: 2021/12/10 -  15:22
 */
public class Cellphone{


    public void testWork(Calculate calculate, int i, int j){
        System.out.println("运行结果是：" + calculate.work(i, j));

    }

    public static void main(String[] args) {
        Cellphone c = new Cellphone();
        c.testWork(new Calculate() {
            @Override
            public int work(int i, int j) {
                return i + j;
            }
        }, 1, 2);
    }
}

